package cn.kgc.spring05.entiy;

import cn.kgc.spring05.advice.LogAdvice;
import org.springframework.stereotype.Component;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/2/21
 * @Description:
 */
@Component

public class TeacherA  implements  Teacher{

    @Override
    @LogAdvice
    public String teachOnLine(String course) {

        System.out.println("TeacherA开始"+course+"课程线上教学");
        if(course.equals("java")){
            throw  new RuntimeException("入门到放弃");
        }
        return course+"课程线上教学";
    }

    @Override
    @LogAdvice
    public String teachOffline(Integer courseId) {
        System.out.println("TeacherA开始"+ courseId+"课程线下教学");
        return  courseId+"课程线线下教学";
    }
}
